 package com.sca4cloud.sca.microservice.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.web.client.RestTemplate;
@Configuration("restTemplateCfg")
public class RestTemplateConfig {
     @Bean
     @Primary
     public RestTemplate singleTemplate() {
         return new RestTemplate();
     }
     @Bean
     @LoadBalanced
     public RestTemplate balancedTemplate() {
         return new RestTemplate();
     }
}
